Many wireless electronic devices are capable of exchanging data over a short range distance (e.g., a few to a hundred meters) using wireless data communication protocols. One of such protocols in common use today is Bluetooth. Many of the services offered over Bluetooth can expose private data, or allow a connecting device to control another device. For example, a Bluetooth-enabled headset can be connected to a mobile phone and receive the audio signals destined for the phone. A Bluetooth-enabled mouse can be connected to a computer and control the cursor movement on the computer. For security reasons, it is generally necessary to control the devices that are allowed to gain access to a given Bluetooth device. Therefore, a conventional Bluetooth device generally has a pre-determined personal identification number (PIN) code that can be used for authentication purposes.
The Bluetooth protocol defines a pairing process, which determines whether two Bluetooth-enabled devices (also referred to “Bluetooth devices”) can be authenticated to wirelessly communicate with each other. To pair two Bluetooth devices that do not have the “Secure Simple Pairing” (SSP) feature (which is available in Bluetooth 2.1 or later versions), a user typically has to manually enter PIN codes on both devices. A device that does not have a keypad or other means for entering the PIN code can use a pre-determined static PIN code for the pairing purposes. The PIN code is provided by the manufacturers of Bluetooth devices and is usually documented in the user manual. The PIN code can be used to compute an encryption key, which encrypts the wireless link between two Bluetooth devices to prevent man-in-the-middle attacks.
Conventionally, when a user wishes to pair two Bluetooth devices, the user typically has to manually enter at least one PIN code of one of the devices during the pairing process. For example, if one device is a headset and the other device is a mobile phone, a user typically has to look up the PIN in the headset's user manual, and enter the PIN using a keypad on the mobile phone. Once a pairing between the two devices has been established, the pairing is remembered by the two devices. Subsequent connections between the two devices can be established without repeating the pair process unless the pairing relationship is removed by the user.